﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CXMLStudioIDE.WinFormsUI.Docking;
using CXMLStudioIDE.Common.Entities;
using CXMLStudioIDE.DataAccessLayer;

namespace CXMLStudioIDE.Forms
{
    public partial class frmSolutionProperties : DockContent
    {
        private MainForm m_parent;

        public frmSolutionProperties(MainForm parent)
        {
            InitializeComponent();
            m_parent = parent;
            txtProjectName.Text = m_parent.m_SolutionManager.m_solution.Name;
            //CXMLStudioIDE.DataAccessLayer.CXMLStudioDAL dal = new CXMLStudioDAL();

        }
        public void SaveChanges()
        {

        }

        private void frmSolutionProperties_FormClosing(object sender, FormClosingEventArgs e)
        {
            DialogResult result = MessageBox.Show(this,"Save Solution Properties?", "CXMLStudioIDE", MessageBoxButtons.YesNoCancel,MessageBoxIcon.Question);
            if (result == DialogResult.Yes || result == DialogResult.No)
            {
                if (result == DialogResult.Yes)
                {
                    //TODO: Call save solution here
                }
                this.Dispose();
            }
        }
    }
}
